<template>
    <div class="box">
        <van-field
        v-model="value"
        rows="4"
        autosize
        style="margin-top:0.2rem"
        label="意见反馈"
        type="textarea"
        maxlength="100"
        placeholder="请输入意见"
        show-word-limit
        />
        <div class="button">
            <van-button type="primary" @click="submit" color="#2d9dff" size="large">提交</van-button>
        </div>
        
    </div>
</template>
<script>
export default {
    data() {
            return {
                value:''
            }
        },
    methods: {
        
        submit(){
            (async ()=>{
                let data = await this.get('/addProblem',{problem:this.value});
                if(data.code == 200){
                    this.$toast(data.msg);
                    this.$router.back();
                }
            })()
        }
    },
}
</script>
<style lang="scss" scoped>
    .box{
        background-color: #f7f9fa;
        .button{
            padding: 0 0.1rem;
            box-sizing: border-box;
        }
    }
</style>